//CSC330_Alex_Stoyko_Lab4
#include<iostream>
#include "Card.h"

using namespace std;

string Card::suits[] = {"clubs", "diamonds", "hearts", "spades"};
string Card::faces[] = {"","2","3","4","5","6","7","8","9","10","J", "Q", "K","Ace"};

Card::Card(int s, int f)
{    
    suit = s;
    face = f;
}

string Card::toString ()
{
 	string card_str = "";
	card_str = faces[face] +" of "+ suits[suit]; //to concatenate strings
	return card_str;
}
int Card::CompareTo(Card card)
{
	if(face < card.GetFace())
		return -1;
	else if(face > card.GetFace())
		return 1;
	else 
		return 0;
}
bool Card::IsSamSuit(Card card)
{
	if(suit == card.GetSuit())
		return true;
	return false;
}
